package com.day05;

public class ArrayTest1 {
    public static void main(String[] args) {
        //5.数组元素的默认初始化值
        //>数组元素是整型:0
        int[] arr = new int[4];
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }
        System.out.println("*******");

        short[] arr1 = new short[4];
        for (int i = 0; i < arr1.length; i++) {
            System.out.println(arr1[i]);
        }

        System.out.println("*******");
        //数组元素是浮点型:0.0
        float[] arr2 = new float[4];
        for (int i = 0; i < arr2.length; i++) {
            System.out.println(arr2[i]);
        }

        System.out.println("********");
        //数组元素是char类型：0或,而非'0'
        char[] chars = new char[4];
        for(int i = 0; i < chars.length; i++){
            System.out.println(chars[i]);
        }


        System.out.println("********");
        //数组元素是boolean类型：false
        boolean[] booleans = new boolean[4];
        for(int i = 0; i < booleans.length; i++){
            System.out.println(booleans[i]);
        }

        System.out.println("********");
        //数组元素是引用数据类型：null
        String[] strings = new String[4];
        for(int i = 0; i < strings.length; i++){
            System.out.println(strings[i]);
        }



    }
}
